Annotating an image with a texture fill

ABSTRACT

Various embodiments provide for systems, methods, and computer-readable storage media for annotating a digital image with a texture fill. An annotation system may receive a user input defining a border separating a first portion of a target digital image from a second portion of the target digital image. The annotation system may then generate a contour mask, such as a binary mask, for the target digital image based on the user-defined border. The annotation system may then apply a media overlay to the target image based on the contour mask. In particular, the contour mask can define portions of the target digital image such that the annotation system will apply a media overlay to at least one of those portions while not applying the media overlay to remaining portions of the target digital image.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims priority to and the benefit of U.S. ProvisionalPatent Application No. 62/517,510, filed on Jun. 9, 2017, which isincorporated herein by reference in its entirety.

TECHNICAL FIELD

Embodiments described herein relate to media overlays and, moreparticularly, but not by way of limitation, to systems, methods,devices, and instructions for annotating a digital image with a texturefill.

BACKGROUND

Conventional software applications permit users to capture and alterdigital images through an electronic device, such as a smartphone. Forexample, some software applications provide users with a set of featuresthat they can use to alter a captured image by adjusting colors,applying filters, overlaying additional visual content on the capturedimage, and the like. Unfortunately, conventional digital image systemstypically only provide fixed visual content (e.g., visual content offixed size and shape) that can be overlaid on a digital image. As aresult, some visual content may not fit well with respect to aparticular digital image. Further, visual content overlays may be largein data size and, therefore, resource—(e.g., computer, data storage, anddata communication) intensive to maintain or provide to a user computingdevice, such as a smartphone.

BRIEF DESCRIPTION OF THE DRAWINGS

Various ones of the appended drawings merely illustrate some embodimentsof the present disclosure and should not be considered as limiting itsscope. The drawings are not necessarily drawn to scale. To easilyidentify the discussion of any particular element or act, the mostsignificant digit or digits in a reference number refer to the figurenumber in which that element is first introduced, and like numerals maydescribe similar components in different views.

FIG. 1 is a block diagram showing an example messaging system forexchanging data (e.g., messages and associated content) over a network.

FIG. 2 is block diagram illustrating further details regarding amessaging system, according to some embodiments.

FIG. 3 is a schematic diagram illustrating data which may be stored inthe database of the messaging system, according to some embodiments.

FIG. 4 is a schematic diagram illustrating a structure of a message,according to some embodiments, generated by a messaging clientapplication for communication.

FIG. 5 is a schematic diagram illustrating an example access-limitingprocess, in terms of which access to content (e.g., an ephemeral messageand associated multimedia payload of data) or a content collection(e.g., an ephemeral message story) may be time-limited (e.g., madeephemeral).

FIG. 6 is a block diagram illustrating an example annotation system forannotating a digital image with a texture fill, according to someembodiments.

FIGS. 7 and 8 are flowcharts illustrating example methods for annotatinga digital image with a texture fill, according to some embodiments.

FIG. 9 provides screenshots of example graphical user interfaces forannotating a digital image with a texture fill, according to someembodiments.

FIG. 10 is a block diagram illustrating a representative softwarearchitecture, which may be used in conjunction with various hardwarearchitectures herein described.

FIG. 11 is a block diagram illustrating components of a machine,according to some embodiments, able to read instructions from amachine-readable medium (e.g., a machine-readable storage medium) andperform any one or more of the methodologies discussed herein.

DETAILED DESCRIPTION

Various embodiments provide systems, methods, devices, and instructionsfor annotating a digital image (hereafter, also referred to as animage), such as one captured by a mobile computing device, with atexture fill. According to some embodiments, an annotation systemreceives a user input defining a border separating a first portion of atarget digital image from a second portion of the target digital image.The annotation system may then generate a contour mask, such as a binarymask, for the target digital image based on the user-defined border. Theannotation system may then apply a media overlay to the target imagebased on the contour mask. In particular, the contour mask can defineportions of the target digital image such that the annotation systemwill apply a media overlay to at least one of those portions while notapplying the media overlay to remaining portions of the target digitalimage.

Various embodiments described herein can dynamically size or shapevisual content prior to overlaying the visual content on a digitalimage. In this way, some embodiments can cause visual content to fitwell with respect to a particular digital image. Additionally, someembodiments can handle visual content overlays that are large in datasize such that the overlay process is less resource—(e.g., compute, datastorage, or data communication) intensive than before. In this way, someembodiments permit a visual content overlay process to better operate ona user computing device, such as a smartphone.

The description that follows includes systems, methods, techniques,instruction sequences, and computing machine program products thatembody illustrative embodiments of the disclosure. In the followingdescription, for the purposes of explanation, numerous specific detailsare set forth in order to provide an understanding of variousembodiments of the inventive subject matter. It will be evident,however, to those skilled in the art, that embodiments of the inventivesubject matter may be practiced without these specific details. Ingeneral, well-known instruction instances, protocols, structures, andtechniques are not necessarily shown in detail.

Reference will now be made in detail to embodiments of the presentdisclosure, examples of which are illustrated in the appended drawings.The present disclosure may, however, be embodied in many different formsand should not be construed as being limited to the embodiments setforth herein.

FIG. 1 is a block diagram showing an example messaging system 100 forexchanging data (e.g., messages and associated content) over a network.The messaging system 100 includes multiple client devices 102, each ofwhich hosts a number of applications including a messaging clientapplication 104. Each messaging client application 104 iscommunicatively coupled to other instances of the messaging clientapplication 104 and a messaging server system 108 via a network 106(e.g., the Internet).

Accordingly, each messaging client application 104 can communicate andexchange data with another messaging client application 104 and with themessaging server system 108 via the network 106. The data exchangedbetween messaging client applications 104, and between a messagingclient application 104 and the messaging server system 108, includesfunctions (e.g., commands to invoke functions) as well as payload data(e.g., text, audio, video or other multimedia data).

The messaging server system 108 provides server-side functionality viathe network 106 to a particular messaging client application 104. Whilecertain functions of the messaging system 100 are described herein asbeing performed by either a messaging client application 104 or by themessaging server system 108, it will be appreciated that the location ofcertain functionality either within the messaging client application 104or the messaging server system 108 is a design choice. For example, itmay be technically preferable to initially deploy certain technology andfunctionality within the messaging server system 108, but to latermigrate this technology and functionality to the messaging clientapplication 104 where a client device 102 has a sufficient processingcapacity.

The messaging server system 108 supports various services and operationsthat are provided to the messaging client application 104. Suchoperations include transmitting data to, receiving data from, andprocessing data generated by the messaging client application 104. Thisdata may include message content, client device information, geolocationinformation, media annotation and overlays, message content persistenceconditions, social network information, and live event information, asexamples. Data exchanges within the messaging system 100 are invoked andcontrolled through functions available via user interfaces (UIs) of themessaging client application 104.

Turning now specifically to the messaging server system 108, anApplication Program Interface (API) server 110 is coupled to, andprovides a programmatic interface to, an application server 112. Theapplication server 112 is communicatively coupled to a database server118, which facilitates access to a database 120 in which is stored dataassociated with messages processed by the application server 112.

Dealing specifically with the Application Program Interface (API) server110, this server receives and transmits message data (e.g., commands andmessage payloads) between the client device 102 and the applicationserver 112. Specifically, the API server 110 provides a set ofinterfaces (e.g., routines and protocols) that can be called or queriedby the messaging client application 104 in order to invoke functionalityof the application server 112. The API server 110 exposes variousfunctions supported by the application server 112, including accountregistration; login functionality; the sending of messages, via theapplication server 112, from a particular messaging client application104 to another messaging client application 104; the sending of mediafiles (e.g., digital images or video) from a messaging clientapplication 104 to the messaging server application 114, and forpossible access by another messaging client application 104; the settingof a collection of media data (e.g., story), the retrieval of a list offriends of a user of a client device 102; the retrieval of suchcollections; the retrieval of messages and content, the adding anddeletion of friends to a social graph; the location of friends within asocial graph; and opening an application event (e.g., relating to themessaging client application 104).

The application server 112 hosts a number of applications andsubsystems, including a messaging server application 114, an imageprocessing system 116, and a social network system 122. The messagingserver application 114 implements a number of message processingtechnologies and functions, particularly related to the aggregation andother processing of content (e.g., textual and multimedia content)included in messages received from multiple instances of the messagingclient application 104. As will be described in further detail, the textand media content from multiple sources may be aggregated intocollections of content (e.g., called stories or galleries). Thesecollections are then made available, by the messaging server application114, to the messaging client application 104. Other processor- andmemory-intensive processing of data may also be performed server-side bythe messaging server application 114, in view of the hardwarerequirements for such processing.

The application server 112 also includes an image processing system 116that is dedicated to performing various image processing operations,typically with respect to digital images or video received within thepayload of a message at the messaging server application 114.

The social network system 122 supports various social networkingfunctions and services, and makes these functions and services availableto the messaging server application 114. To this end, the social networksystem 122 maintains and accesses an entity graph 304 (FIG. 3) withinthe database 120. Examples of functions and services supported by thesocial network system 122 include the identification of other users ofthe messaging system 100 with which a particular user has relationshipsor is “following”, and also the identification of other entities andinterests of a particular user.

The application server 112 is communicatively coupled to a databaseserver 118, which facilitates access to a database 120 in which isstored data associated with messages processed by the messaging serverapplication 114.

FIG. 2 is block diagram illustrating further details regarding themessaging system 100, according to some embodiments. Specifically, themessaging system 100 is shown to comprise the messaging clientapplication 104 and the application server 112, which in turn embody anumber of some subsystems, namely an ephemeral timer system 202, acollection management system 204, and an annotation system 206.

The ephemeral timer system 202 is responsible for enforcing thetemporary access to content permitted by the messaging clientapplication 104 and the messaging server application 114. To this end,the ephemeral timer system 202 incorporates a number of timers that,based on duration and display parameters associated with a message, orcollection of messages (e.g., a story), selectively display and enableaccess to messages and associated content via the messaging clientapplication 104. Further details regarding the operation of theephemeral timer system 202 are provided below.

The collection management system 204 is responsible for managingcollections of media (e.g., collections of text, image, video, and audiodata). In some examples, a collection of content (e.g., messages,including digital images, video, text, and audio) may be organized intoan “event gallery” or an “event story.” Such a collection may be madeavailable for a specified time period, such as the duration of an eventto which the content relates. For example, content relating to a musicconcert may be made available as a “story” for the duration of thatmusic concert. The collection management system 204 may also beresponsible for publishing an icon that provides notification of theexistence of a particular collection to the user interface of themessaging client application 104.

The collection management system 204 furthermore includes a curationinterface 208 that allows a collection manager to manage and curate aparticular collection of content. For example, the curation interface208 enables an event organizer to curate a collection of contentrelating to a specific event (e.g., delete inappropriate content orredundant messages). Additionally, the collection management system 204employs machine vision (or image recognition technology) and contentrules to automatically curate a content collection. In certainembodiments, compensation may be paid to a user for inclusion ofuser-generated content into a collection. In such cases, the curationinterface 208 operates to automatically make payments to such users forthe use of their content.

The annotation system 206 provides various functions that enable a userto annotate or otherwise modify or edit media content associated with amessage. For example, the annotation system 206 provides functionsrelated to the generation and publishing of media overlays for messagesprocessed by the messaging system 100. The annotation system 206operatively supplies a media overlay, such as a filter, a digitalsticker, or a texture fill, to the messaging client application 104,which a user can then use to annotate the digital image.

A media overlay may include, without limitation, audio content, visualcontent, audio effects, and visual effects. Audio and visual content mayinclude, for instance, images (e.g., pictures), text, logos, animations,texture fills and sound effects. A visual effect may include, forinstance, color overlaying or texture filling. The media overlay can beapplied to a media content item (e.g., a photo, image, video, etc.) atthe client device 102. For example, a media overlay may include textthat can be overlaid over an image (e.g., photo) captured by the clientdevice 102. In another example, a media overlay may include a locationoverlay comprising text (e.g., stylized text) identifying a place (e.g.,Venice beach), a geographic location (e.g., latitude and longitude), aname of a live event (e.g., a concert). In another example, a mediaoverlay may include a name of a merchant (e.g., a merchant overlay, suchas one for Beach Coffee House). In some embodiments, the annotationsystem 206 uses the geolocation of the client device 102 to identify amedia overlay, such as a merchant overlay that is associated with andnames a merchant at the geolocation of the client device 102. The mediaoverlay may include another indicium associated with the merchant. Themedia overlays may be stored in the database 120 and accessed throughthe database server 118.

As used herein, a target digital image may refer to a digital image towhich a texture fill is applied. A texture fill may comprise a type ofmedia overlay that overlays a selected (visual) texture over a digitalimage. A texture fill may be based on a sample digital image that isrepeated (e.g., in an arrangement) over an entire portion of a targetdigital image, or over a certain (e.g., user-selected) portion of thetarget digital image. An example of a texture fill may comprise apattern, such as polka dot pattern that includes a sample digital imageof a single dot or of an arrangement of two or more dots, where thesample digital image can be repeated over a target digital image in apredetermined arrangement to create the polka dot pattern. Any type ofsample digital image may be used to create a texture fill, such as asample digital image comprising one or more roses, grass, one or moreflowers, and the like. The sample digital image may be repeated in anarrangement to create the texture fill. A sample digital image maycomprise a semi-transparent digital image that may be overlaid on thetarget digital image such that some portion of the underlying targetdigital image shows through the sample digital image.

A texture fill may also include a full digital image that is not createdbased on a sample digital image. For example, the texture fill could bea larger singular digital image or a non-repetitive pattern that isoverlaid over the target digital image whole.

The annotation system 206 enables a user to select application of atexture fill over a target digital image or, alternatively, a selectedportion of the target digital image. For example, the annotation system206 may enable a user to provide a user input defining a border withrespect to the target digital image (e.g., on the target digital image),where the border defines a portion of the target digital image that willreceive the texture fill and at least another portion of the image thatwill not receive the texture fill. As an example, the annotation system206 may enable a user to use a touch screen, mouse, or other human inputdevice to draw the border on the target digital image, which results inat least two portions being defined, and to select at least one of theat least two portions to receive the texture fill. Additionally, theannotation system 206 may enable a user to use a touch screen, mouse, orother human input device to select a texture fill. Accordingly, the usermay draw a border, such as a circle, square, or the like, on a targetdigital image, thereby resulting in a portion of the target digitalimage within the border (e.g., inside the circle, square, etc.) or aportion of the target digital image outside of the border. The user maythen select whether the portion within the border or the portion outsideof the border will receive the texture fill.

The annotation system 206 may use the user-defined border to generate acontour mask for the target digital image, such as a binary mask.According to various embodiments, the contour mask defines portions ofthe target digital image, where one or more of those defined portionswill be annotated by the annotation system 206 during an annotationprocess (e.g., application of a texture fill) while leaving remainingportions of the target digital image unchanged by the same annotationprocess.

For instance, for some embodiments, the annotation system 206 uses abinary mask generated based on a user-defined border to apply a texturefill (e.g., selected by a user from a plurality of texture fills) to aportion of the target digital image selected by a user (e.g., a portionautomatically selected based on the user-defined border). A binary maskmay comprise a matrix of binary values (e.g., 0 or 1) that correspond tothe pixels in an image. For example, an image with five pixels acrossand five pixels long would result in a binary mask consisting of afive-by-five matrix of binary values. Each of the binary values maycorrespond to a unique one of the pixels in the target digital image.The annotation system 206 may set each binary value in the binary maskbased on whether the binary value's corresponding pixel in the targetdigital image is within or outside the border provided by the user. Forexample, the annotation system 206 sets each binary value correspondingto a pixel within the border to 0 and each binary value corresponding toa pixel outside of the border to 1. Alternatively, the annotation system206 sets each binary value corresponding to a pixel within the border to1 and each binary value corresponding to a pixel outside of the borderto 0. Though various embodiments are described herein with respect to abinary mask, for some embodiments the contour mask comprises somethingother than a binary mask.

The annotation system 206 may apply the texture fill to the targetdigital image based on the binary mask. For example, the annotationsystem 206 may apply the texture fill to each bit in the target digitalimage that corresponds to a binary value in the binary mask that is setto 1. Additionally, the annotation system 206 may apply the texture fillto each bit in the target digital image that corresponds to a binaryvalue in the binary mask that is set to 0. As a result, for someembodiments, the texture fill is applied to the portions of the targetdigital image selected by the user and is not applied to the otherportions of the target digital image according to the binary maskgenerated based on the user-defined border.

The annotation system 206 may use one of multiple techniques to apply atexture fill to a target digital image. One technique used by theannotation system 206 may comprise using a texture synthesis/texturetransfer approach. For example, the annotation system 206 may use asample digital image and apply the texture synthesis/texture transfertechnique to generate the texture fill and annotate the target digitalimage. This technique may provide the benefit of using a small digitalimage (e.g., a sample digital image that is smaller in pixel size thanthe target digital image) to provide a texture fill of a target digitalimage as well as allowing for more complicated patterns. The complexityof applying such a technique may vary based on the sample digital image.For instance, simple sample digital images that easily form blendedpatterns (e.g., polka dots, stripes, etc.) may be easier to synthesizeinto a texture fill than more complicated sample digital images.

The texture synthesis/texture transfer process may be based on a knownprocess (See. e.g., Efros, Alexei A., and Freeman, William T. (2001).Image quilting for texture synthesis and transfer. ACM 2001 (Proceedingsof the 28th annual conference on computer graphics and interactivetechniques)). For example, the texture synthesis/texture transferprocess may first resize a texture pattern T, which comprises one ormore sample digital images associated with a texture fill, to be thesame pixel size as an input image I, which represents a target digitalimage that is to be annotated by the texture synthesis/texture transferprocess. Next, the texture synthesis/texture transfer process mayminimize the following cost function to compute a desired output digitalimage O, which represents the target digital image after the textpattern T is applied to the entire target digital image.∥O−I∥ ² +Λ∥ΔO−ΔT∥.

After computing the desired output digital image O, the texturesynthesis/texture transfer process may use a user-defined contour mask(e.g., binary mask generated based on a border drawn around an object bya user) to blend the desired output digital image O with the inputdigital image I and to generate a final digital image. The desiredoutput digital image O may be blended with the input digital image Iusing the user-defined contour mask by performing fast Laplacianblending. The Laplacian blending process may be based on a known process(See, e.g., Gomez, Steve (2010). Project 2: Image Blending: Writeup.Retrieved fromhttps://cs.brown.edu/courses/csci1950-g/results/proj2/steveg/). Thefinal digital image may be such that the portion of content from theinput digital image I that falls within the user-defined contour mask ismaintained as originally depicted in the input digital image I. and theportion of content from the input digital image I that falls outside theuser-defined contour mask is replaced by corresponding content from thedesired output digital image O. The final digital image may represent anannotated digital image based on the target digital image, theuser-defined contour mask, and the texture fill comprising the sampledigital image.

Another technique used by the annotation system 206 may comprise using afull texture fill. The full texture fill may comprise a single instanceof a sample digital image constituting the entire texture fill for atarget digital image, thereby obviating the need to perform texturesynthesis. The annotation system 206 may directly blend the texture fillwith the digital image using, for example. Laplacian blending and thebinary mask. In this way, a full texture fill can be used on a targetdigital image to add the single instance of the sample digital image tothe target digital image as a background image, where the backgroundimage is blended with the target digital image. Though pixel size of thefull texture fill may or may not be much larger than that of targetdigital image, using the full texture fill may allow for easyapplication of any pattern or image (via a single instance of thedigital sample image), regardless of the complexity of the pattern orimage.

A third technique used by the annotation system 206 may compriseduplicating at least a portion of the sample digital image to create thetexture fill. For example, the annotation system 206 may generate apattern based on a sample digital image by sampling at a least a portionof the sample digital image and then repeatedly arranging (e.g.,placing) copies of the sampled portion relative to each other (e.g.,next to each other) to form the pattern. In this way, the thirdtechnique can populate the pattern using the sample digital image. Tocreate the texture fill, such a technique may use a sample digital imagethat is smaller than a target digital image and that may comprise asimple pattern. This third technique may be based on a known patterngeneration process (See, e.g., Santoni. Christian, and Pellacini, Fabio(2016). gTangle: a Grammar for the Procedural Generation of TanglePatterns, ACM Transactions on Graphics (Proceedings of SIGGRAPH Asia2016)).

The media overlays may be stored in the database 120 and accessedthrough the database server 118.

In one embodiment, the annotation system 206 provides a user-basedpublication platform that enables a user to select a geolocation on amap and upload content associated with the selected geolocation. Throughthe annotation system 206, the user may also specify circumstances underwhich a particular media overlay (e.g., a user-created media overlay)should be offered to other users. For some embodiments, the annotationsystem 206 generates a media overlay that includes the uploaded contentassociated with a geolocation (e.g., user-selected geolocation), andassociates the generated media overlay with the geolocation.

In another embodiment, the annotation system 206 provides amerchant-based publication platform that enables a merchant to select aparticular media overlay (e.g., one created by the merchant or for themerchant) and to associate the particular media overlay selected with ageolocation, real-world feature, an image context, or the like, based ona bidding process. For example, the annotation system 206 may associatethe media overlay of a highest-bidding merchant with a correspondinggeolocation, real-world feature, determined image context, or the like.This association may be for a predefined amount of time.

FIG. 3 is a schematic diagram illustrating data 300 which may be storedin the database 120 of the messaging server system 108, according tocertain embodiments. While the content of the database 120 is shown tocomprise a number of tables, it will be appreciated that the data couldbe stored in other types of data structures (e.g., as an object-orienteddatabase).

The database 120 includes message data stored within a message table314. The entity table 302 stores entity data, including an entity graph304. Entities for which records are maintained within the entity table302 may include individuals, corporate entities, organizations, objects,places, events etc. Regardless of type, any entity regarding which themessaging server system 108 stores data may be a recognized entity. Eachentity is provided with a unique identifier, as well as an entity typeidentifier (not shown).

The entity graph 304 furthermore stores information regardingrelationships and associations between entities. Such relationships maybe social, professional (e.g., work at a common corporation ororganization) interest-based or activity-based, merely for example.

The database 120 also stores annotation data, such as filters, mediaoverlays, texture fills and sample digital images in an annotation table312. Filters, media overlays, texture fills, and sample digital imagesfor which data is stored within the annotation table 312 are associatedwith and applied to videos (for which data is stored in a video table310) or digital images (for which data is stored in an image table 308).In one example, an image overlay can be displayed as overlaid on adigital image or video during presentation to a recipient user. Forexample, a user may append a media overlay on a selected portion of thedigital image, resulting in presentation of an annotated digital imagethat includes the media overlay over the selected portion of the digitalimage. In this way, a media overlay can be used, for example, as adigital sticker or a texture fill that a user can use to annotate orotherwise enhance a digital image, which may be capture by a user (e.g.,photograph).

Each stored media overlay can be associated with metadata describing themedia overlay. For example, the media overlay can be associated withmetadata describing a physical item, action, or activity depicted by themedia overlay, such as a guitar, shoes, running, or the like. Themetadata can also include categorization data describing one or morecategories associated with the media overlay. For example, a mediaoverlay depicting a digital image of a guitar can be associated withcategories, such as music, rock and roll music, or musical instruments.In some embodiments, the categorization data can include various levelsof categories associated with a media overlay. For example, thecategorization data can identify a general categorization for a mediaoverlay that describes the media overlay at a high level, as well as oneor more specific categorization levels that describe the media overlaywith greater specificity. For example, a media overlay depicting aguitar can be assigned a general categorization of music and morespecific categorizations, such as musical instrument, guitar, orelectric guitars. The categorization data can also include a contextualcategorization of a media overlay that describes a context that themedia overlay is associated with. For example, a contextualcategorization such as sunny day can include media overlays depictingdigital images, such as beach balls, hot dogs, or baseball.

Filters may be of various types, including user-selected filters from agallery of filters presented to a sending user by the messaging clientapplication 104 when the sending user is composing a message. Othertypes of filters include geolocation filters (also known as geo-filters)which may be presented to a sending user based on geographic location.For example, geolocation filters specific to a neighborhood or speciallocation may be presented within a user interface by the messagingclient application 104, based on geolocation information determined by aGPS unit of the client device 102. Another type of filter is a datafilter, which may be selectively presented to a sending user by themessaging client application 104, based on other inputs or informationgathered by the client device 102 during the message creation process.Examples of data filters include current temperature at a specificlocation, a current speed at which a sending user is traveling, batterylife for a client device 102, or the current time.

Other annotation data that may be stored within the image table 308 isso-called “lens” data. A “lens” may be a real-time special effect andsound that may be added to an image or a video.

As mentioned above, the video table 310 stores video data which, in oneembodiment, is associated with messages for which records are maintainedwithin the message table 314. Similarly, the image table 308 storesimage data associated with messages for which message data is stored inthe entity table 302. The entity table 302 may associate variousannotations from the annotation table 312 with various images and videosstored in the image table 308 and the video table 310.

A story table 306 stores data regarding collections of messages andassociated image, video, or audio data, which are compiled into acollection (e.g., a story or a gallery). The creation of a particularcollection may be initiated by a particular user (e.g., each user forwhich a record is maintained in the entity table 302). A user may createa “personal story” in the form of a collection of content that has beencreated and sent/broadcast by that user. To this end, the user interfaceof the messaging client application 104 may include an icon that isuser-selectable to enable a sending user to add specific content to hisor her personal story.

A collection may also constitute a “live story,” which is a collectionof content from multiple users that is created manually, automatically,or using a combination of manual and automatic techniques. For example,a “live story” may constitute a curated stream of user-submitted contentfrom various locations and events. Users whose client devices havelocation services enabled and are at a common location event at aparticular time may, for example, be presented with an option, via auser interface of the messaging client application 104, to contributecontent to a particular live story. The live story may be identified tothe user by the messaging client application 104, based on his or herlocation. The end result is a “live story” told from a communityperspective.

A further type of content collection is known as a “location story,”which enables a user whose client device 102 is located within aspecific geographic location (e.g., on a college or university campus)to contribute to a particular collection. In some embodiments, acontribution to a location story may require a second degree ofauthentication to verify that the end user belongs to a specificorganization or other entity (e.g., is a student on the universitycampus).

FIG. 4 is a schematic diagram illustrating a structure of a message 400,according to some in some embodiments, generated by a messaging clientapplication 104 for communication to a further messaging clientapplication 104 or the messaging server application 114. The content ofa particular message 400 is used to populate the message table 314stored within the database 120, accessible by the messaging serverapplication 114. Similarly, the content of a message 400 is stored inmemory as “in-transit” or “in-flight” data of the client device 102 orthe application server 112. The message 400 is shown to include thefollowing components:

-   -   A message identifier 402: a unique identifier that identifies        the message 400.    -   A message text payload 404: text, to be generated by a user via        a user interface of the client device 102 and that is included        in the message 400.    -   A message image payload 406: image data, captured by a camera        component of a client device 102 or retrieved from memory of a        client device 102, and that is included in the message 400.    -   A message video payload 408: video data, captured by a camera        component or retrieved from a memory component of the client        device 102 and that is included in the message 400.    -   A message audio payload 410: audio data, captured by a        microphone or retrieved from the memory component of the client        device 102, and that is included in the message 400.    -   A message annotation 412: annotation data (e.g., filters,        stickers, texture fills, or other enhancements) that represents        annotations to be applied to message image payload 406, message        video payload 408, or message audio payload 410 of the message        400.    -   A message duration parameter 414: parameter value indicating, in        seconds, the amount of time for which content of the message        (e.g., the message image payload 406, message video payload 408,        message audio payload 410) is to be presented or made accessible        to a user via the messaging client application 104.    -   A message geolocation parameter 416: geolocation data (e.g.,        latitudinal and longitudinal coordinates) associated with the        content payload of the message. Multiple message geolocation        parameter 416 values may be included in the payload, each of        these parameter values being associated with respect to content        items included in the content (e.g., a specific image into        within the message image payload 406, or a specific video in the        message video payload 408).    -   A message story identifier 418: identifier values identifying        one or more content collections (e.g., “stories”) with which a        particular content item in the message image payload 406 of the        message 400 is associated. For example, multiple images within        the message image payload 406 may each be associated with        multiple content collections using identifier values.    -   A message tag 420: each message 400 may be tagged with multiple        tags, each of which is indicative of the subject matter of        content included in the message payload. For example, where a        particular image included in the message image payload 406        depicts an animal (e.g., a lion), a tag value may be included        within the message tag 420 that is indicative of the relevant        animal. Tag values may be generated manually, based on user        input, or may be automatically generated using, for example,        image recognition.    -   A message sender identifier 422: an identifier (e.g., a        messaging system identifier, email address or device identifier)        indicative of a user of the client device 102 on which the        message 400 was generated and from which the message 400 was        sent.    -   A message receiver identifier 424: an identifier (e.g., a        messaging system identifier, email address, or device        identifier) indicative of a user of the client device 102 to        which the message 400 is addressed.

The contents (e.g., values) of the various components of message 400 maybe pointers to locations in tables within which content data values arestored. For example, an image value in the message image payload 406 maybe a pointer to (or address of) a location within an image table 308.Similarly, values within the message video payload 408 may point to datastored within a video table 310, values stored within the messageannotations 412 may point to data stored in an annotation table 312,values stored within the message story identifier 418 may point to datastored in a story table 306, and values stored within the message senderidentifier 422 and the message receiver identifier 424 may point to userrecords stored within an entity table 302.

FIG. 5 is a schematic diagram illustrating an access-limiting process500, in terms of which access to content (e.g., an ephemeral message502, and associated multimedia payload of data) or a content collection(e.g., an ephemeral message story 504) may be time-limited (e.g., madeephemeral).

An ephemeral message 502 is shown to be associated with a messageduration parameter 506, the value of which determines an amount of timethat the ephemeral message 502 will be displayed to a receiving user ofthe ephemeral message 502 by the messaging client application 104. Inone embodiment, an ephemeral message 502 is viewable by a receiving userfor up to a maximum of 10 seconds, depending on the amount of time thatthe sending user specifies using the message duration parameter 506.

The message duration parameter 506 and the message receiver identifier424 are shown to be inputs to a message timer 512, which is responsiblefor determining the amount of time that the ephemeral message 502 isshown to a particular receiving user identified by the message receiveridentifier 424. In particular, the ephemeral message 502 will only beshown to the relevant receiving user for a time period determined by thevalue of the message duration parameter 506. The message timer 512 isshown to provide output to a more generalized ephemeral timer system202, which is responsible for the overall timing of display of content(e.g., an ephemeral message 502) to a receiving user.

The ephemeral message 502 is shown in FIG. 5 to be included within anephemeral message story 504 (e.g., a personal story, or an event story).The ephemeral message story 504 has an associated story durationparameter 508, a value of which determines a time duration for which theephemeral message story 504 is presented and accessible to users of themessaging system 100. The story duration parameter 508, for example, maybe the duration of a music concert, where the ephemeral message story504 is a collection of content pertaining to that concert.Alternatively, a user (either the owning user or a curator user) mayspecify the value for the story duration parameter 508 when performingthe setup and creation of the ephemeral message story 504.

Additionally, each ephemeral message 502 within the ephemeral messagestory 504 has an associated story participation parameter 510, a valueof which determines the duration of time for which the ephemeral message502 will be accessible within the context of the ephemeral message story504. Accordingly, a particular ephemeral message story 504 may “expire”and become inaccessible within the context of the ephemeral messagestory 504, prior to the ephemeral message story 504 itself expiring interms of the story duration parameter 508. The story duration parameter508, story participation parameter 510, and message receiver identifier424 each provide input to a story timer 514, which operationallydetermines, firstly, whether a particular ephemeral message 502 of theephemeral message story 504 will be displayed to a particular receivinguser and, if so, for how long. Note that the ephemeral message story 504is also aware of the identity of the particular receiving user as aresult of the message receiver identifier 424.

Accordingly, the story timer 514 operationally controls the overalllifespan of an associated ephemeral message story 504, as well as anindividual ephemeral message 502 included in the ephemeral message story504. In one embodiment, each and every ephemeral message 502 within theephemeral message story 504 remains viewable and accessible for a timeperiod specified by the story duration parameter 508. In a furtherembodiment, a certain ephemeral message 502 may expire, within thecontext of ephemeral message story 504, based on a story participationparameter 510. Note that a message duration parameter 506 may stilldetermine the duration of time for which a particular ephemeral message502 is displayed to a receiving user, even within the context of theephemeral message story 504. Accordingly, the message duration parameter506 determines the duration of time that a particular ephemeral message502 is displayed to a receiving user, regardless of whether thereceiving user is viewing that ephemeral message 502 inside or outsidethe context of an ephemeral message story 504.

The ephemeral timer system 202 may furthermore operationally remove aparticular ephemeral message 502 from the ephemeral message story 504based on a determination that it has exceeded an associated storyparticipation parameter 510. For example, when a sending user hasestablished a story participation parameter 510 of 24 hours fromposting, the ephemeral timer system 202 will remove the relevantephemeral message 502 from the ephemeral message story 504 after thespecified 24 hours. The ephemeral timer system 202 also operates toremove an ephemeral message story 504 either when the storyparticipation parameter 510 for each and every ephemeral message 502within the ephemeral message story 504 has expired, or when theephemeral message story 504 itself has expired in terms of the storyduration parameter 508.

In certain use cases, a creator of a particular ephemeral message story504 may specify an indefinite story duration parameter 508. In thiscase, the expiration of the story participation parameter 510 for thelast remaining ephemeral message 502 within the ephemeral message story504 will determine when the ephemeral message story 504 itself expires.In this case, a new ephemeral message 502, added to the ephemeralmessage story 504, with a new story participation parameter 510,effectively extends the life of an ephemeral message story 504 to equalthe value of the story participation parameter 510.

Responsive to the ephemeral timer system 202 determining that anephemeral message story 504 has expired (e.g., is no longer accessible),the ephemeral timer system 202 communicates with the messaging system100 (and, for example, specifically the messaging client application104) to cause an indicium (e.g., an icon) associated with the relevantephemeral message story 504 to no longer be displayed within a userinterface of the messaging client application 104. Similarly, when theephemeral timer system 202 determines that the message durationparameter 506 for a particular ephemeral message 502 has expired, theephemeral timer system 202 causes the messaging client application 104to no longer display an indicium (e.g., an icon or textualidentification) associated with the ephemeral message 502.

FIG. 6 is a block diagram illustrating various modules of an annotationsystem 206, according to some embodiments. The annotation system 206 isshown as including an interface module 602, a border generation module604, a mask generation module 606, and a texture fill module 608. Thevarious modules of the annotation system 206 are configured tocommunicate with each other (e.g., via a bus, shared memory, or aswitch). Any one or more of these modules may be implemented using oneor more computer processors 610 (e.g., by configuring such one or morecomputer processors 610 to perform functions described for that module)and hence may include one or more of the computer processors 610.

Any one or more of the modules described may be implemented usinghardware alone (e.g., one or more of the computer processors 610 of amachine (e.g., machine 1100)) or a combination of hardware and software.For example, any described module of the annotation system 206 mayphysically include an arrangement of one or more of the computerprocessors 610 (e.g., a subset of or among the one or more computerprocessors of the machine (e.g., machine 1100)) configured to performthe operations described herein for that module. As another example, anymodule of the annotation system 206 may include software, hardware, orboth, that configure an arrangement of one or more computer processors610 (e.g., among the one or more computer processors of the machine(e.g., machine 1100)) to perform the operations described herein forthat module. Accordingly, different modules of the annotation system 206may include and configure different arrangements of such computerprocessors 610 or a single arrangement of such computer processors 610at different points in time. Moreover, any two or more modules of theannotation system 206 may be combined into a single module, and thefunctions described herein for a single module may be subdivided amongmultiple modules. Furthermore, according to various embodiments, modulesdescribed herein as being implemented within a single machine, database,or device may be distributed across multiple machines, databases, ordevices.

The interface module 602 provides a user interface that enables a userto annotate a target digital image with a texture fill. The userinterface may include user interface elements, such as buttons, scrollbars, and the like, that enable the user to select an existing digitalimage or capture a new digital image, as well as select from a set ofavailable texture fills to annotate the target digital image.Accordingly, the user may use the user interface to select a targetdigital image (e.g., from a library of digital images) and a desiredtexture fill to annotate the target digital image. The annotation system206 may enable the user to apply the texture full over the entire imageor, alternatively, a selected portion of the target digital image.

The interface module 602 may further enable a user to provide a userinput defining a border on the target digital image that defines aportion of the target digital image to receive the texture fill andanother portion of the target digital image that will not receive thetexture fill. As an example, the border generation module 604 enables auser to use a touch screen, mouse, or other input device to draw theborder on the target digital image, as well as select which resultingportions of the target digital image are to receive the texture fill.Accordingly, the user may draw a border, such as a circle, square, etc.,on the target digital image and select whether the portion of the targetdigital image within the border (e.g., inside the circle, square, etc.)or the portion outside of the border will received the texture fill.

The interface module 602 generates a set of coordinates or pixels of thetarget digital image traversed by the user input and provides thecoordinates or pixels to the border generation module 604. The bordergeneration module 604 generates a border based on the set of coordinatesor pixels provided by the interface module 602. The border generationmodule 604 may apply smoothing or contouring techniques to theuser-defined border, thereby removing jagged edges of the border, whichcan enhance the resulting annotation to the target digital image (e.g.,using a contour mask generated based on the border).

The mask generation module 606 uses the border, generated by the bordergeneration module 604, to generate a contour mask for the target digitalimage, such as a binary mask. A binary mask may comprise a matrix ofbinary values that correspond to pixels in a target digital image. Forexample, a target digital image with five pixels across and five pixelswide would result in a binary mask consisting of a five-by-five matrixof binary values in accordance with one embodiment. Each of the binaryvalues may correspond to a unique one of the pixels in the targetdigital image. The mask generation module 606 may set each binary valuein the binary mask based on whether the binary value's correspondingpixel in the target digital image is within or outside the borderdefined by the user via the interface module 602. For instance, the maskgeneration module 606 may set each binary value corresponding to a pixelwithin the border to 0 and each binary value corresponding to a pixeloutside of the border to 1. Alternatively, the mask generation module606 may set each binary value corresponding to a pixel within the borderto 1 and each binary value corresponding to a pixel outside of theborder to 0.

The texture fill module 608 applies the texture fill to the targetdigital image based on a contour mask (e.g., a binary mask) generated bythe mask generation module 606. For example, the texture fill module 608applies the texture fill to each pixel in the target digital image thatcorresponds to a binary value in the binary mask that is set to 1.Alternatively, the texture fill module 608 applies the texture fill toeach pixel in the target digital image that corresponds to a binaryvalue in the binary mask that is set to 0. As a result, the texture fillis applied to one or more portions of the target digital image selectedby the user and is not applied to remaining portions of the targetdigital image.

The texture fill module 608 uses at least one technique (e.g., frommultiple techniques) to apply a texture fill to a target digital imagebased on a contour mask. As described herein, one technique used by theannotation system 206 may comprise using a texture synthesis/texturetransfer approach. For example, the texture fill module 608 may use asample digital image and apply the texture synthesis/texture transfertechnique to generate the texture fill and annotate the target digitalimage. This technique may provide the benefit of using a small digitalimage (e.g., a sample digital image that is smaller in pixel size thanthe target digital image) to provide a texture fill of a target digitalimage as well as allowing for more complicated patterns. The complexityof applying such a technique may vary based on the sample digital image.For instance, simple sample digital images that easily form blendedpatterns (e.g., polka dots, stripes, etc.) may be easier to synthesizeinto a texture fill than more complicated sample digital images.

As also described herein, the texture synthesis/texture transfer processmay be based on a known process (See. e.g., Efros, Alexei A., andFreeman. William T. (2001). Image quilting for texture synthesis andtransfer, ACM 2001 (Proceedings of the 28th annual conference oncomputer graphics and interactive techniques)). For example, the texturesynthesis/texture transfer process may first resize a texture pattern T,which comprises one or more sample digital images associated with atexture fill, to be the same pixel size as an input image I, whichrepresents a target digital image that is to be annotated by the texturesynthesis/texture transfer process. Next, the texture synthesis/texturetransfer process may minimize the following cost function to compute adesired output digital image O, which represents the target digitalimage after the text pattern T is applied to the entire target digitalimage.∥O−I∥ ² +Λ∥ΔO−ΔT∥.After computing the desired output digital image O, the texturesynthesis/texture transfer process may use a user-defined contour mask(e.g., binary mask generated based on a border drawn around an object bya user) to blend the desired output digital image O with the inputdigital image I and to generate a final digital image. The desiredoutput digital image O may be blended with the input digital image Iusing the user-defined contour mask by performing fast Laplacianblending. The Laplacian blending process may be based on a known process(See, e.g., Gomez. Steve (2010). Project 2: Image Blending: Writeup.Retrieved fromhttps://cs.brown.edulcourses/csci1950-g/results/proj2/steveg/). Thefinal digital image may be such that the portion of content from theinput digital image I that falls within the user-defined contour mask ismaintained as originally depicted in the input digital image I, and theportion of content from the input digital image I that falls outside theuser-defined contour mask is replaced by corresponding content from thedesired output digital image O. The final digital image may represent anannotated digital image based on the target digital image, theuser-defined contour mask, and the texture fill comprising the sampledigital image.

Another technique used by the texture fill module 608 may comprise usinga full texture fill. The full texture fill may comprise a singleinstance of a sample digital image constituting the entire texture fillfor a target digital image, thereby obviating the need to performtexture synthesis. The texture fill module 608 may directly blend thetexture fill with the digital image using, for example, Laplacianblending and the binary mask. In this way, a full texture fill can beused on a target digital image to add the single instance of the sampledigital image to the target digital image as a background image, wherethe background image is blended with the target digital image. Thoughthe pixel size of the full texture fill may or may not be much largerthan that of target digital image, using the full texture fill may allowfor easy application of any pattern or image (via a single instance ofthe digital sample image), regardless of the complexity of the patternor image.

A third technique used by the texture fill module 608 may compriseduplicating at least a portion of the sample digital image to create thetexture fill. For example, the texture fill module 608 may generate apattern based on a sample digital image by sampling at a least a portionof the sample digital image and then repeatedly arranging (e.g.,placing) copies of the sampled portion relative to each other (e.g.,next to each other) to form the pattern. In this way, the thirdtechnique can populate the pattern using the sample digital image. Tocreate the texture fill, such a technique may use a sample digital imagethat is smaller than a target digital image and that may comprise asimple pattern. This third technique may be based on a known patterngeneration process (See, e.g., Santoni, Christian, and Pellacini. Fabio(2016). gTangle: a Grammar for the Procedural Generation of TanglePatterns, ACM Transactions on Graphics (Proceedings of SIGGRAPH Asia2016)).

FIG. 7 is a flowchart illustrating a method 700 for annotating an imagewith a texture full, according to certain embodiments. The method 700may be embodied in computer-readable instructions for execution by oneor more computer processors such that the operations of the method 700may be performed in part or in whole by the messaging server system 108;accordingly, the method 700 is described below by way of example withreference thereto. At least some of the operations of the method 700 maybe deployed on various other hardware configurations, and the method 700is not intended to be limited to being operated by the messaging serversystem 108.

At operation 702, the interface module 602 receives a user inputdefining a border with respect to a target digital image. For example, auser may use a touchpad, mouse, or other input device to draw the borderon a target digital image displayed on a client device. The targetdigital image may be, for example, one that is captured by a user (e.g.,via the client device) or selected by the user (e.g., from a library ofdigital images). The border may separate a first portion of the targetdigital image that is within the border from a second portion of thetarget digital image that is outside of the border. The user may alsoselect which portion of the target digital image (i.e., inside theborder or outside of the border) the media overlay (e.g., texture fill)should be applied to. The border generation module 604 may apply acontouring technique to coordinate data received via the user input. Thecontoured coordinate data may represent the border.

At operation 704, the mask generation module 606 generates a contourmask, such as a binary mask, for the target digital image based on theborder, which is defined by the user input received at operation 702.The binary mask may include a set of binary values corresponding to aset of pixels of the target digital image. Each binary value in the setof binary values may correspond to a unique one of the pixels in the setof pixels. A first subset of binary values from the set of binary valuesthat correspond to pixels in the first portion of the target digitalimage may be assigned a first value by the mask generation module 606. Asecond subset of binary values from the set of binary values thatcorrespond to pixels in the second portion of the target digital imagemay be assigned a second value that is different than the first value bythe mask generation module 606. For instance, the first value may be 0and the second value may be 1. Alternatively, the first value may be 1and the second value may be 0.

At operation 706, the texture fill module 608 applies a media overlay tothe target digital image based on the contour mask generated byoperation 704. The texture fill module 608 may use one of severaltechniques to apply a media overlay based on the contour mask. Further,the texture fill module 608 may select a texturing technique to usebased on a sample digital image for the media overlay. For someembodiments, the texture fill module 608 may select a technique bestsuited for the sample digital image. For instance, the texture fillmodule 608 of an embodiment may choose to use a full texture fillapproach or a repeated-duplication approach described herein where thesample digital image is determined to contain simple content (e.g., ablack and white or greyscale content). Using such techniques may saveone or more computing resources on the machine (e.g., client device)performing the method 700, such as processing or memory resources.Alternatively, the texture fill module 608 of an embodiment may chooseto use a texture synthesis/texture transfer approach where the sampledigital image is determined to contain complex content.

In some embodiments, the texture fill module 608 applies the mediaoverlay (e.g., texture fill) by accessing a sample digital imageselected by the user. The sample digital image in this case may besmaller in pixel size than the target digital image. The texture fillmodule 608 may apply a texture synthesis technique based on the sampledigital image and the target digital image, yielding the media overlay.The texture fill module 608 may then apply a texture transfer techniqueto the media overlay and the target digital image based on the contourmask, yielding an annotated digital image.

In some embodiments, the texture fill module 608 applies the mediaoverlay by accessing a full digital image associated with the mediaoverlay. The texture fill module 608 may then apply, based on thecontour mask, the media overlay to the target digital image using aLaplacian blending, yielding an annotated digital image.

In some embodiments, the texture fill module 608 applies the mediaoverlay by accessing a sample digital image selected by the user that issmaller than the target digital image. The texture fill module 608 mayduplicate the sample digital image based on a pixel size of the targetdigital image, yielding the media overlay. The texture fill module 608may then apply the media overlay to the target digital image based onthe contour mask, yielding an annotated digital image.

FIG. 8 is a flowchart illustrating a method 800 for annotating an imagewith a texture fill, according to certain embodiments. The method 800may be embodied in computer-readable instructions for execution by oneor more computer processors such that the operations of the method 800may be performed in part or in whole by the messaging server system 108;accordingly, the method 800 is described below by way of example withreference thereto. At least some of the operations of the method 800 maybe deployed on various other hardware configurations, and the method 800is not intended to be limited to being operated by the messaging serversystem 108.

At operation 802, the interface module 602 causes a target digital imageto be displayed on an electronic display (e.g., of a client device). Themethod 800 continues with operation 804, where the interface module 602receives a user input defining a border. For some embodiments, operation804 is similar to operation 702 of the method 700 described above withrespect to FIG. 7. According to some embodiments, the interface module602 generates coordinate data based on the user input received, wherethe coordinate data represents the border.

At operation 806, the border generation module 604 applies a contouringtechnique to coordinate data received via the user input, where the userinput was received by the interface module 602 at operation 804. Asdescribed herein, applying the contouring to the coordinate data canremove jagged edges of the border and smoothen it, which in turn canenhance the resulting annotation of the target digital image (e.g.,using a contour mask generated based on the border).

At operation 808, the texture fill module 608 selects a texturingtechnique to be used to apply a media overlay (e.g., texture fill) tothe target digital image based on a sample digital image for the mediaoverlay. As described herein, the texture fill module 608 may select thetexturing technique best suited for the sample digital image. Forinstance, the texture fill module 608 may choose to use a full texturefill approach or a repeated-duplication approach described herein wherethe sample digital image is determined to contain simple content.Alternatively, the texture fill module 608 may choose to use a texturesynthesis/texture transfer approach where the sample digital image isdetermined to contain complex content.

At operation 810, the texture fill module 608 generates the mediaoverlay, based on the sample digital image, using the texture techniqueselected by the texture fill module 608 at operation 808. According tosome embodiments, the media overlay generated by the texture fill module608 comprises a texture fill to be applied to the target digital image.

At operation 812, the mask generation module 606 generates a contourmask, such as a binary mask, for the target digital image based on theborder. With respect to the method 800, the mask generation module 606generates the contour mask based on the border that results after theborder generation module 604 applies the contouring technique to theborder at operation 806. For some embodiments, operation 812 is similarto operation 704 of the method 700 described above with respect to FIG.7.

At operation 814, the texture fill module 608 applies the media overlay,generated by operation 810, to the target digital image based on thecontour mask generated by operation 812. For some embodiments, operation814 is similar to operation 706 of the method 700 described above withrespect to FIG. 7.

FIG. 9 provides screenshots of example graphical user interfaces forannotating a digital image with a texture fill, according to certainembodiments. In particular, the first screenshot 902 shows a graphicaluser interface that is displaying a target digital image that may havebeen selected or captured by a user (e.g., via a user device) and thatthe user may wish to annotate with a texture fill in accordance withsome embodiments. As shown, the target digital image comprises a coffeecup being held by an individual.

The second screenshot 904 shows a graphical user interface after a userhas selected a texture fill (e.g., pattern), which causes the selectedtexture fill (comprising roses) to be displayed over the target digitalimage. In the second screenshot 904, the target digital image asdisplayed has yet to be been finalized by the annotation process. Asshown in the second screenshot 904, the graphical user interfaceinstructs the user to outline an object in the target digital image.

The third screenshot 906 shows a graphical user interface where the userdrew a border 922 (e.g., outlined) around an object depicted in thetarget digital image, specifically the coffee cup and the user's hand.According to some embodiments, the border 922 defines a first portion ofthe target digital image that the texture fill will be applied to (i.e.,the portion outside of the border 922, which does not include the cupand the user's hand), and a second portion of the target digital imagethat the texture fill will not be applied to (i.e., the portion insidethe border 922, which includes the cup and the user's hand).

Diagram 908 is not a screenshot but better illustrates the border 922,the first portion 934 of the target digital image and the second portion932 of the target digital image. As described herein, based on theborder 922, some embodiments generate a contour mask (e.g., binary mask)that defines the first portion 934 and the second portion 932. Suchembodiments may then use the contour mask to apply the texture fillselected by the user (e.g., in the second screenshot 904).

The fourth screenshot 910 shows a graphical user interface displaying a(finalized) annotated digital image after the texture fill has beenapplied to the target digital image based on the border 922 (i.e., thetexture fill applied only to the first portion 934 of the image). Thefifth screenshot 912 shows a graphical user interface that displays theannotated digital image after the graphical controls for the annotationprocess are hidden.

FIG. 10 is a block diagram illustrating an example software architecture1006, which may be used in conjunction with various hardwarearchitectures herein described. FIG. 10 is a non-limiting example of asoftware architecture and it will be appreciated that many otherarchitectures may be implemented to facilitate the functionalitydescribed herein. The software architecture 1006 may execute on hardwaresuch as machine 1100 of FIG. 11 that includes, among other things,processors 1104, memory/storage 1106, and I/O components 1118. Arepresentative hardware layer 1052 is illustrated and can represent, forexample, the machine 1100 of FIG. 11. The representative hardware layer1052 includes a processing unit 1054 having associated executableinstructions 1004. Executable instructions 1004 represent the executableinstructions of the software architecture 1006, including implementationof the methods, components and so forth described herein. The hardwarelayer 1052 also includes memory or storage modules memory/storage 1056,which also have executable instructions 1004. The hardware layer 1052may also comprise other hardware 1058.

In the example architecture of FIG. 10, the software architecture 1006may be conceptualized as a stack of layers where each layer providesparticular functionality. For example, the software architecture 1006may include layers such as an operating system 1002, libraries 1020,applications 1016, and a presentation layer 1014. Operationally, theapplications 1016 or other components within the layers may invokeapplication programming interface (API) calls 1008 through the softwarestack and receive a response in the example form of messages 1012 to theAPI calls 1008. The layers illustrated are representative in nature andnot all software architectures have all layers. For example, some mobileor special purpose operating systems may not provide aframeworks/middleware 1018, while others may provide such a layer. Othersoftware architectures may include additional or different layers.

The operating system 1002 may manage hardware resources and providecommon services. The operating system 1002 may include, for example, akernel 1022, services 1024 and drivers 1026. The kernel 1022 may act asan abstraction layer between the hardware and the other software layers.For example, the kernel 1022 may be responsible for memory management,processor management (e.g., scheduling), component management,networking, security settings, and so on. The services 1024 may provideother common services for the other software layers. The drivers 1026are responsible for controlling or interfacing with the underlyinghardware. For instance, the drivers 1026 include display drivers, cameradrivers, Bluetooth® drivers, flash memory drivers, serial communicationdrivers (e.g., Universal Serial Bus (USB) drivers), Wi-Fi® drivers,audio drivers, power management drivers, and so forth depending on thehardware configuration.

The libraries 1020 provide a common infrastructure that is used by theapplications 1016 or other components or layers. The libraries 1020provide functionality that allows other software components to performtasks in an easier fashion than to interface directly with theunderlying operating system 1002 functionality (e.g., kernel 1022,services 1024, or drivers 1026). The libraries 1020 may include systemlibraries 1044 (e.g., C standard library) that may provide functionssuch as memory allocation functions, string manipulation functions,mathematical functions, and the like. In addition, the libraries 1020may include API libraries 1046 such as media libraries (e.g., librariesto support presentation and manipulation of various media format such asMPREG4, H.264. MP3, AAC, AMR, JPG, PNG), graphics libraries (e.g., anOpenGL framework that may be used to render 2D and 3D in a graphiccontent on a display), database libraries (e.g., SQLite that may providevarious relational database functions), web libraries (e.g., WebKit thatmay provide web browsing functionality), and the like. The libraries1020 may also include a wide variety of other libraries 1048 to providemany other APIs to the applications 1016 and other softwarecomponents/modules.

The frameworks/middleware 1018 (also sometimes referred to asmiddleware) provide a higher-level common infrastructure that may beused by the applications 1016 or other software components/modules. Forexample, the frameworks/middleware 1018 may provide various graphic userinterface (GUI) functions, high-level resource management, high-levellocation services, and so forth. The frameworks/middleware 1018 mayprovide a broad spectrum of other APIs that may be used by theapplications 1016 or other software components/modules, some of whichmay be specific to a particular operating system 1002 or platform.

The applications 1016 include built-in applications 1038 or third-partyapplications 1040. Examples of representative built-in applications 1038may include, but are not limited to, a contacts application, a browserapplication, a book reader application, a location application, a mediaapplication, a messaging application, or a game application. Third-partyapplications 1040 may include an application developed using theANDROID™ or IOS™ software development kit (SDK) by an entity other thanthe vendor of the particular platform, and may be mobile softwarerunning on a mobile operating system such as IOS™, ANDROID™. WINDOWS®Phone, or other mobile operating systems. The third-party applications1040 may invoke the API calls 1008 provided by the mobile operatingsystem (such as operating system 1002) to facilitate functionalitydescribed herein.

The applications 1016 may use built-in operating system functions (e.g.,kernel 1022, services 1024, or drivers 1026), libraries 1020, andframeworks/middleware 1018 to create user interfaces to interact withusers of the system. Alternatively, or additionally, in some systemsinteractions with a user may occur through a presentation layer, such aspresentation layer 1014. In these systems, the application/component“logic” can be separated from the aspects of the application/componentthat interact with a user.

FIG. 11 is a block diagram illustrating components of a machine 1100,according to some embodiments, able to read instructions from amachine-readable medium (e.g., a machine-readable storage medium) andperform any one or more of the methodologies discussed herein.Specifically, FIG. 11 shows a diagrammatic representation of the machine1100 in the example form of a computer system, within which instructions1110 (e.g., software, a program, an application, an applet, an app, orother executable code) for causing the machine 1100 to perform any oneor more of the methodologies discussed herein may be executed. As such,the instructions 1110 may be used to implement modules or componentsdescribed herein. The instructions 1110 transform the general,non-programmed machine 1100 into a particular machine 1100 programmed tocarry out the described and illustrated functions in the mannerdescribed. In alternative embodiments, the machine 1100 operates as astandalone device or may be coupled (e.g., networked) to other machines.In a networked deployment, the machine 1100 may operate in the capacityof a server machine or a client machine in a server-client networkenvironment, or as a peer machine in a peer-to-peer (or distributed)network environment. The machine 1100 may comprise, but not be limitedto, a server computer, a client computer, a personal computer (PC), atablet computer, a laptop computer, a netbook, a set-top box (STB), apersonal digital assistant (PDA), an entertainment media system, acellular telephone, a smart phone, a mobile device, a wearable device(e.g., a smart watch), a smart home device (e.g., a smart appliance),other smart devices, a web appliance, a network router, a networkswitch, a network bridge, or any machine capable of executing theinstructions 1110, sequentially or otherwise, that specify actions to betaken by machine 1100. Further, while only a single machine 1100 isillustrated, the term “machine” shall also be taken to include acollection of machines that individually or jointly execute theinstructions 1110 to perform any one or more of the methodologiesdiscussed herein.

The machine 1100 may include processors 1104, memory memory/storage1106, and I/O components 1118, which may be configured to communicatewith each other such as via a bus 1102. The memory/storage 1106 mayinclude a memory 1114, such as a main memory, or other memory storage,and a storage unit 1116, both accessible to the processors 1104 such asvia the bus 1102. The storage unit 1116 and memory 1114 store theinstructions 1110 embodying any one or more of the methodologies orfunctions described herein. The instructions 1110 may also reside,completely or partially, within the memory 1114, within the storage unit1116, within at least one of the processors 1104 (e.g., within theprocessor's cache memory), or any suitable combination thereof, duringexecution thereof by the machine 1100. Accordingly, the memory 1114, thestorage unit 1116, and the memory of processors 1104 are examples ofmachine-readable media.

The I/O components 1118 may include a wide variety of components toreceive input, provide output, produce output, transmit information,exchange information, capture measurements, and so on. The specific I/Ocomponents 1118 that are included in a particular machine 1100 willdepend on the type of machine. For example, portable machines such asmobile phones will likely include a touch input device or other suchinput mechanisms, while a headless server machine will likely notinclude such a touch input device. It will be appreciated that the I/Ocomponents 1118 may include many other components that are not shown inFIG. 11. The I/O components 1118 are grouped according to functionalitymerely for simplifying the following discussion and the grouping is inno way limiting. In various embodiments, the I/O components 1118 mayinclude output components 1126 and input components 1128. The outputcomponents 1126 may include visual components (e.g., a display such as aplasma display panel (PDP), a light emitting diode (LED) display, aliquid crystal display (LCD), a projector, or a cathode ray tube (CRT)),acoustic components (e.g., speakers), haptic components (e.g., avibratory motor, resistance mechanisms), other signal generators, and soforth. The input components 1128 may include alphanumeric inputcomponents (e.g., a keyboard, a touch screen configured to receivealphanumeric input, a photo-optical keyboard, or other alphanumericinput components), point based input components (e.g., a mouse, atouchpad, a trackball, a joystick, a motion sensor, or other pointinginstrument), tactile input components (e.g., a physical button, a touchscreen that provides location or force of touches or touch gestures, orother tactile input components), audio input components (e.g., amicrophone), and the like.

In further embodiments, the I/O components 1118 may include biometriccomponents 1130, motion components 1134, environment components 1136, orposition components 1138 among a wide array of other components. Forexample, the biometric components 1130 may include components to detectexpressions (e.g., hand expressions, facial expressions, vocalexpressions, body gestures, or eye tracking), measure biosignals (e.g.,blood pressure, heart rate, body temperature, perspiration, or brainwaves), identify a person (e.g., voice identification, retinalidentification, facial identification, fingerprint identification, orelectroencephalogram based identification), and the like. The motioncomponents 1134 may include acceleration sensor components (e.g.,accelerometer), gravitation sensor components, rotation sensorcomponents (e.g., gyroscope), and so forth. The environment components1136 may include, for example, illumination sensor components (e.g.,photometer), temperature sensor components (e.g., one or morethermometer that detect ambient temperature), humidity sensorcomponents, pressure sensor components (e.g., barometer), acousticsensor components (e.g., one or more microphones that detect backgroundnoise), proximity sensor components (e.g., infrared sensors that detectnearby objects), gas sensors (e.g., gas detection sensors to detectionconcentrations of hazardous gases for safety or to measure pollutants inthe atmosphere), or other components that may provide indications,measurements, or signals corresponding to a surrounding physicalenvironment. The position components 1138 may include location sensorcomponents (e.g., a Global Position system (GPS) receiver component),altitude sensor components (e.g., altimeters or barometers that detectair pressure from which altitude may be derived), orientation sensorcomponents (e.g., magnetometers), and the like.

Communication may be implemented using a wide variety of technologies.The I/O components 1118 may include communication components 1140operable to couple the machine 1100 to a network 1132 or devices 1120via coupling 1122 and coupling 1124 respectively. For example, thecommunication components 1140 may include a network interface componentor other suitable device to interface with the network 1132. In furtherexamples, communication components 1140 may include wired communicationcomponents, wireless communication components, cellular communicationcomponents, Near Field Communication (NFC) components, Bluetooth®components (e.g., Bluetooth® Low Energy), Wi-Fi® components, and othercommunication components to provide communication via other modalities.The devices 1120 may be another machine or any of a wide variety ofperipheral devices (e.g., a peripheral device coupled via a UniversalSerial Bus (USB)).

Moreover, the communication components 1140 may detect identifiers orinclude components operable to detect identifiers. For example, thecommunication components 1140 may include Radio Frequency Identification(RFID) tag reader components, NFC smart tag detection components,optical reader components (e.g., an optical sensor to detectone-dimensional bar codes such as Universal Product Code (UPC) bar code,multi-dimensional bar codes such as Quick Response (QR) code, Azteccode. Data Matrix. Dataglyph, MaxiCode, PDF417, Ultra Code, UCC RSS-2Dbar code, and other optical codes), or acoustic detection components(e.g., microphones to identify tagged audio signals). In addition, avariety of information may be derived via the communication components1140, such as, location via Internet Protocol (IP) geo-location,location via Wi-Fi® signal triangulation, location via detecting a NFCbeacon signal that may indicate a particular location, and so forth.

As used herein, “ephemeral message” can refer to a message that isaccessible for a time-limited duration (e.g., maximum of 10 seconds). Anephemeral message may comprise a text content, image content, audiocontent, video content and the like. The access time for the ephemeralmessage may be set by the message sender or, alternatively, the accesstime may be a default setting or a setting specified by the recipient.Regardless of the setting technique, an ephemeral message is transitory.A message duration parameter associated with an ephemeral message mayprovide a value that determines the amount of time that the ephemeralmessage can be displayed or accessed by a receiving user of theephemeral message. An ephemeral message may be accessed or displayedusing a messaging client software application capable of receiving anddisplaying content of the ephemeral message, such as an ephemeralmessaging application.

As also used herein, “ephemeral message story” can refer to a collectionof ephemeral message content that is accessible for a time-limitedduration, similar to an ephemeral message. An ephemeral message storymay be sent from one user to another, and may be accessed or displayedusing a messaging client software application capable of receiving anddisplaying the collection of ephemeral content, such as an ephemeralmessaging application.

Throughout this specification, plural instances may implementcomponents, operations, or structures described as a single instance.Although individual operations of one or more methods are illustratedand described as separate operations, one or more of the individualoperations may be performed concurrently, and nothing requires that theoperations be performed in the order illustrated. Structures andfunctionality presented as separate components in example configurationsmay be implemented as a combined structure or component. Similarly,structures and functionality presented as a single component may beimplemented as separate components. These and other variations,modifications, additions, and improvements fall within the scope of thesubject matter herein.

Although an overview of the inventive subject matter has been describedwith reference to specific embodiments, various modifications andchanges may be made to these embodiments without departing from thebroader scope of embodiments of the present disclosure.

The embodiments illustrated herein are described in sufficient detail toenable those skilled in the art to practice the teachings disclosed.Other embodiments may be used and derived therefrom, such thatstructural and logical substitutions and changes may be made withoutdeparting from the scope of this disclosure. The detailed description,therefore, is not to be taken in a limiting sense, and the scope ofvarious embodiments is defined only by the appended claims, along withthe full range of equivalents to which such claims are entitled.

As used herein, modules may constitute software modules (e.g., codestored or otherwise embodied in a machine-readable medium or in atransmission medium), hardware modules, or any suitable combinationthereof. A “hardware module” is a tangible (e.g., non-transitory)physical component (e.g., a set of one or more processors) capable ofperforming certain operations and may be configured or arranged in acertain physical manner. In various embodiments, one or more computersystems or one or more hardware modules thereof may be configured bysoftware (e.g., an application or portion thereof) as a hardware modulethat operates to perform operations described herein for that module.

In some embodiments, a hardware module may be implementedelectronically. For example, a hardware module may include dedicatedcircuitry or logic that is permanently configured to perform certainoperations. A hardware module may be or include a special-purposeprocessor, such as a field programmable gate array (FPGA) or an ASIC. Ahardware module may also include programmable logic or circuitry that istemporarily configured by software to perform certain operations. As anexample, a hardware module may include software encompassed within a CPUor other programmable processor.

Considering embodiments in which hardware modules are temporarilyconfigured (e.g., programmed), each of the hardware modules need not beconfigured or instantiated at any one instance in time. For example,where a hardware module includes a CPU configured by software to becomea special-purpose processor, the CPU may be configured as respectivelydifferent special-purpose processors (e.g., each included in a differenthardware module) at different times. Software (e.g., a software module)may accordingly configure one or more processors, for example, to becomeor otherwise constitute a particular hardware module at one instance oftime and to become or otherwise constitute a different hardware moduleat a different instance of time.

Hardware modules can provide information to, and receive informationfrom, other hardware modules. Accordingly, described hardware modulesmay be regarded as being communicatively coupled. Where multiplehardware modules exist contemporaneously, communications may be achievedthrough signal transmission (e.g., over suitable circuits and buses)between or among two or more of the hardware modules. In embodiments inwhich multiple hardware modules are configured or instantiated atdifferent times, communications between such hardware modules may beachieved, for example, through the storage and retrieval of informationin memory structures to which the multiple hardware modules have access.For example, one hardware module may perform an operation and store theoutput of that operation in a memory (e.g., a memory device) to which itis communicatively coupled. A further hardware module may then, at alater time, access the memory to retrieve and process the stored output.Hardware modules may also initiate communications with input or outputdevices, and can operate on a resource (e.g., a collection ofinformation from a computing resource).

The various operations of example methods described herein may beperformed, at least partially, by one or more processors that aretemporarily configured (e.g., by software) or permanently configured toperform the relevant operations. Whether temporarily or permanentlyconfigured, such processors may constitute processor-implemented modulesthat operate to perform one or more operations or functions describedherein. As used herein, “processor-implemented module” refers to ahardware module in which the hardware includes one or more processors.Accordingly, the operations described herein may be at least partiallyprocessor-implemented, hardware-implemented, or both, since a processoris an example of hardware, and at least some operations within any oneor more of the methods discussed herein may be performed by one or moreprocessor-implemented modules, hardware-implemented modules, or anysuitable combination thereof.

As used herein, the term “or” may be construed in either an inclusive orexclusive sense. The terms “a” or “an” should be read as meaning “atleast one,” “one or more,” or the like. The use of words and phrasessuch as “one or more,” “at least.” “but not limited to.” or other likephrases shall not be read to mean that the narrower case is intended orrequired in instances where such broadening phrases may be absent.

Boundaries between various resources, operations, modules, engines, anddata stores are somewhat arbitrary, and particular operations areillustrated in a context of specific illustrative configurations. Otherallocations of functionality are envisioned and may fall within a scopeof various embodiments of the present disclosure. In general, structuresand functionality presented as separate resources in the exampleconfigurations may be implemented as a combined structure or resource.Similarly, structures and functionality presented as a single resourcemay be implemented as separate resources. These and other variations,modifications, additions, and improvements fall within a scope ofembodiments of the present disclosure as represented by the appendedclaims. The specification and drawings are, accordingly, to be regardedin an illustrative rather than a restrictive sense.

The description above includes systems, methods, devices, instructions,and computer media (e.g., computing machine program products) thatembody illustrative embodiments of the disclosure. In the description,for the purposes of explanation, numerous specific details are set forthin order to provide an understanding of various embodiments of theinventive subject matter. It will be evident, however, to those skilledin the art, that embodiments of the inventive subject matter may bepracticed without these specific details. In general, well-knowninstruction instances, protocols, structures, and techniques are notnecessarily shown in detail.

What is claimed is:
 1. A method comprising: receiving from a user a userinput defining a border with respect to a target digital image, theborder separating a first portion of the target digital image from asecond portion of the target digital image, the first portion beingdisposed within the border, and the second portion being disposedoutside of the border; generating a binary mask for the target digitalimage based on the border, the binary mask including a set of binaryvalues corresponding to a set of pixels of the target digital image, afirst subset of binary values from the set of binary valuescorresponding to pixels in the first portion of the target digitalimage, a second subset of binary values from the set of binary valuescorresponding to pixels in the second portion of the target digitalimage, the first subset of binary values being assigned a first valueand the second subset of binary values being assigned a second valuethat is different than the first value; and applying a media overlay tothe target digital image based on the binary mask, the media overlaybeing applied to each pixel of the target digital image corresponding toa binary value assigned the second value.
 2. The method of claim 1,wherein the first value is 0 and second value is
 1. 3. The method ofclaim 1, further comprising: applying a contouring technique tocoordinate data received via the user input, yielding the borderseparating the first portion of the target digital image from the secondportion of the target digital image.
 4. The method of claim 1, furthercomprising: selecting, based on a sample digital image for the mediaoverlay, a first texturing technique from a plurality of texturingtechniques; and generating the media overlay using the selected firsttexturing technique.
 5. The method of claim 1, wherein applying themedia overlay comprises: accessing a sample digital image selected bythe user, the sample digital image being smaller than the target digitalimage; applying a texture synthesis technique based on the sampledigital image and the target digital image, yielding the media overlay;and applying a texture transfer technique to the media overlay and thetarget digital image based on the binary mask, yielding an annotateddigital image.
 6. The method of claim 1, wherein applying the mediaoverlay comprises: accessing the media overlay, the media overlay beinga full digital image; and applying, based on the binary mask, the mediaoverlay to the target digital image using a Laplacian blending, yieldingan annotated digital image.
 7. The method of claim 1, wherein applyingthe media overlay comprises: accessing a sample digital image selectedby the user, the sample digital image being smaller than the targetdigital image; duplicating the sample digital image based on a size ofthe target digital image, yielding the media overlay; and applying themedia overlay to the target digital image based on the binary mask,yielding an annotated digital image.
 8. An annotation system comprising:one or more computer processors; and one or more computer-readablemediums storing instructions that, when executed by the one or morecomputer processors, cause the annotation system to perform operationscomprising: receiving from a user a user input defining a borderseparating a first portion of a target digital image that is within theborder from a second portion of the target digital image that is outsideof the border; generating a binary mask for the target digital imagebased on the border separating the first portion of the target digitalimage from the second portion of the target digital image, the binarymask including a set of binary values corresponding to a set of pixelsof the target digital image, each binary value in the set of binaryvalues corresponding to a unique one of the pixels in the set of pixel,a first subset of binary values from the set of binary values thatcorrespond to pixels in the first portion of the target digital imagebeing assigned a first value and a second subset of binary values fromthe set of binary values that correspond to pixels in the second portionof the target digital image being assigned a second value that isdifferent than the first value; and applying a media overlay to thetarget digital image based on the binary mask, the media overlay beingapplied to each pixel of the target digital image corresponding to abinary value assigned the second value.
 9. The annotation system ofclaim 8, wherein the first value is 0 and the second value is
 1. 10. Theannotation system of claim 8, wherein the operations further comprise:applying a contouring technique to coordinate data received via the userinput, yielding the border separating the first portion of the targetdigital image from the second portion of the target digital image. 11.The annotation system of claim 8, wherein the operations furthercomprise: determining, based on a sample digital image for the mediaoverlay, to use a first texturing technique from a plurality oftexturing techniques; and generating the media overlay using the firsttexturing technique.
 12. The annotation system of claim 8, whereinapplying the media overlay comprises: accessing a sample digital imageselected by the user, the sample digital image being smaller than thetarget digital image; applying a texture synthesis technique based onthe sample digital image and the target digital image, yielding themedia overlay; and applying a texture transfer technique to the mediaoverlay and the target digital image based on the binary mask, yieldingan annotated digital image.
 13. The annotation system of claim 8,wherein applying the media overlay comprises: accessing the mediaoverlay, the media overlay being a full digital image; and applying,based on the binary mask, the media overlay to the target digital imageusing a Laplacian blending, yielding an annotated digital image.
 14. Theannotation system of claim 8, wherein applying the media overlaycomprises: accessing a sample digital image selected by the user, thesample digital image being smaller than the target digital image;duplicating the sample digital image based on a size of the targetdigital image, yielding the media overlay; and applying the mediaoverlay to the target digital image based on the binary mask, yieldingan annotated digital image.
 15. A non-transitory computer-readablemedium storing instructions that, when executed by one or more computerprocessors, cause the one or more computer processors to performoperations comprising: receiving from a user a user input defining aborder separating a first portion of a target digital image that iswithin the border from a second portion of the target digital image thatis outside of the border; generating a binary mask for the targetdigital image based on the border separating the first portion of thetarget digital image from the second portion of the target digitalimage, the binary mask including a set of binary values corresponding toa set of pixels of the target digital image, each binary value in theset of binary values corresponding to a unique one of the pixels in theset of pixel, a first subset of binary values from the set of binaryvalues that correspond to pixels in the first portion of the targetdigital image being assigned a first value and a second subset of binaryvalues from the set of binary values that correspond to pixels in thesecond portion of the target digital image being assigned a second valuethat is different than the first value; and applying a media overlay tothe target digital image based on the binary mask, the media overlaybeing applied to each pixel of the target digital image corresponding toa binary value assigned the second value.
 16. The non-transitorycomputer-readable medium of claim 15, wherein the operations furthercomprise: applying a contouring technique to coordinate data receivedvia the user input, yielding the border separating the first portion ofthe target digital image from the second portion of the target digitalimage.
 17. The non-transitory computer-readable medium of claim 15,wherein the operations further comprise: determining, based on a sampledigital image for the media overlay, to use a first texturing techniquefrom a plurality of texturing techniques; and generating the mediaoverlay using the first texturing technique.
 18. The non-transitorycomputer-readable medium of claim 15, wherein applying the media overlaycomprises: accessing a sample digital image selected by the user, thesample digital image being smaller than the target digital image;applying a texture synthesis technique based on the sample digital imageand the target digital image, yielding the media overlay; and applying atexture transfer technique to the media overlay and the target digitalimage based on the binary mask, yielding an annotated digital image. 19.The non-transitory computer-readable medium of claim 15, whereinapplying the media overlay comprises: accessing the media overlay, themedia overlay being a full digital image; and applying, based on thebinary mask, the media overlay to the target digital image using aLaplacian blending, yielding an annotated digital image.
 20. Thenon-transitory computer-readable medium of claim 15, wherein applyingthe media overlay comprises: accessing a sample digital image selectedby the user, the sample digital image being smaller than the targetdigital image; duplicating the sample digital image based on a size ofthe target digital image, yielding the media overlay; and applying themedia overlay to the target digital image based on the binary mask,yielding an annotated digital image.